package com.txy.domain.strategy.repository;

import com.txy.domain.strategy.model.entity.StrategyAwardEntity;
import com.txy.domain.strategy.model.entity.StrategyEntity;
import com.txy.domain.strategy.model.entity.StrategyRuleEntity;
import com.txy.domain.strategy.model.vo.RuleTreeVO;
import com.txy.domain.strategy.model.vo.StrategyAwardRuleModelVo;
import com.txy.domain.strategy.model.vo.StrategyAwardStockVO;

import java.util.HashMap;
import java.util.List;

public interface IStrategyRepository {
    List<StrategyAwardEntity> queryStrategyAwardList(Long strategyId);

    void storeStrategyAwardSearchRateTable(String key, Integer rateRange, HashMap<Integer, Integer> shuffleStrategyAwardSearchRateTables);

    Integer getRateRange(String strategyId);

    Integer getStragegyAwardAssemble(String strategyId, Integer randomNum);

    StrategyEntity queryStrategyByStrategyId(Long strategyId);

    StrategyRuleEntity queryStrategyRule(Long strategyId, String ruleModel);

    String queryStrategyRuleValue(Long strategyId, Integer awardId, String ruleModel);

    String queryRuleModelByStrategyId(Long strategyId);

    StrategyAwardRuleModelVo queryRuleModelByStrategyIdAndAwardId(Long strategyId, Integer randomAwardId);

    String queryStrategyRuleValue(Long strategyId, String ruleBlack);

    RuleTreeVO queryRuleTreeByTreeId(String treeId);

    void storeStrategyStock(Long strategyId, Integer awardId, Integer awardCountSurplus);

    String queryRuleValueByStrategyAwardId(Long strategyId, Integer awardId, String ruleModel);

    Boolean subtractionAwardStock(Long strategyId, Integer awardId);

    void sendQueue(StrategyAwardStockVO strategyAwardStockVO);

    StrategyAwardStockVO getAwardQueue();

    Boolean updateAwardStock(StrategyAwardStockVO strategyAwardStockVO);

    StrategyAwardEntity queryStrategyAwardEntity(Long strategyId, Integer awardId);


}
